from PIL import Image
from torch.utils.tensorboard import SummaryWriter
from torchvision import transforms
import numpy as np

img_path = "datas/train/ants/0013035.jpg"
image = Image.open(img_path)

trans_tensor = transforms.ToTensor()

tensor_image = trans_tensor(image)

print(type(image))
print(type(tensor_image))
print(tensor_image)

writer = SummaryWriter("logs")
writer.add_image("tensor_image", tensor_image, 1)
writer.close()


